import React,{Component} from 'react';
import {
    Link
} from 'react-router-dom'
import { Menu, Icon } from 'antd';
const SubMenu = Menu.SubMenu;
const MenuItem = Menu.Item;
import style from './homeLayout.css';


class HomeLayout extends Component {
    render () {
      const {children} = this.props;
      console.log();
      return (
        <div>
            <header className={style.header}>
                LEMON信息平台
            </header>
            <div className={style.main}>
                <div className={style.menu}>
                    <Menu
                        // defaultSelectedKeys={['1']}
                        defaultOpenKeys={['sub1']}
                        mode="inline"
                        theme="dark"
                    >
                        <Menu.Item key="1" selectedKeys="/users">
                            <Link to='/admin/users'> 
                                <Icon type="pie-chart" />
                                <span>用户</span>
                            </Link>
                        </Menu.Item>
                        <Menu.Item key="2" >
                            <Link to=''>
                                <Icon type="desktop" />
                                <span>首页</span>
                            </Link>
                        </Menu.Item>
                    
                    </Menu>
                </div>
                <div className={style.content}>
                    {children}
                </div>
            </div>
        </div>
      );
    }
  }
  
  export default HomeLayout;
